package cz.muni.fi.pa165.api;

import cz.muni.fi.pa165.api.dto.ForestDTO;
import java.util.List;

/**
 * ForestService interface provides a set of business methods for manipulation
 * and retrieval of forests in form of DTO objects
 *
 * @author Matej Cimbora
 */
public interface ForestService {

    /**
     * Creates a new forest
     *
     * @param forestDTO Object to be created
     */
    public void createForest(ForestDTO forestDTO);

    /**
     * Retrieves a forest by id
     *
     * @param id Forest's id
     * @return DTO object representing forest with given id
     */
    public ForestDTO getForest(Long id);

    /**
     * Updates a forest
     *
     * @param forestDTO Forest to be updated
     */
    public void updateForest(ForestDTO forestDTO);

    /**
     * Removes a forest
     *
     * @param forestDTO Forest to be removed
     */
    public void removeForest(ForestDTO forestDTO);

    /**
     * Retrieves all existing forests
     *
     * @return List of all forests
     */
    public List<ForestDTO> retrieveAllForests();

    /**
     * Retrieves a forest with given name
     *
     * @param name Forest name
     * @return Forest with given name
     */
    public ForestDTO retrieveForestByName(String name);
}
